package com.xiaohong.user.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.Date;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "UserAddress")
public class UserAddress implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "id",accessMode = READ_ONLY)
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long id;//id

    @Schema(description = "用户ID")
    @TableField("userId")
	private String userId;//用户ID

    @Schema(description = "收件人")
    @TableField("name")
	private String name;//收件人

    @Schema(description = "收件手机号")
    @TableField("phone")
	private String phone;//收件手机号

    @Schema(description = "收件地址")
    @TableField("address")
	private String address;//收件地址

    @Schema(description = "是否为默认地址 ‘1’是 ‘0’否 ")
    @TableField("isOften")
	private String isOften;//是否为默认地址 ‘1’是 ‘0’否

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private String deleted;//逻辑删除标志

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private Date gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Long version;//乐观锁



	//get方法
	public Long getId() {
		return id;
	}

	//set方法
	public void setId(Long id) {
		this.id = id;
	}
	//get方法
	public String getUserId() {
		return userId;
	}

	//set方法
	public void setUserId(String userId) {
		this.userId = userId;
	}
	//get方法
	public String getName() {
		return name;
	}

	//set方法
	public void setName(String name) {
		this.name = name;
	}
	//get方法
	public String getPhone() {
		return phone;
	}

	//set方法
	public void setPhone(String phone) {
		this.phone = phone;
	}
	//get方法
	public String getAddress() {
		return address;
	}

	//set方法
	public void setAddress(String address) {
		this.address = address;
	}
	//get方法
	public String getIsOften() {
		return isOften;
	}

	//set方法
	public void setIsOften(String isOften) {
		this.isOften = isOften;
	}
	//get方法
	public String getDeleted() {
		return deleted;
	}

	//set方法
	public void setDeleted(String deleted) {
		this.deleted = deleted;
	}
	//get方法
	public Date getGmtCreate() {
		return gmtCreate;
	}

	//set方法
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	//get方法
	public Date getGmtModified() {
		return gmtModified;
	}

	//set方法
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	//get方法
	public Long getVersion() {
		return version;
	}

	//set方法
	public void setVersion(Long version) {
		this.version = version;
	}


}
